//新闻service层实现类
package com.sy.service.impl;

import java.io.Serializable;
import java.util.List;

import com.sy.dao.impl.PageDaoImpl;
import com.sy.dao.impl.SshnewsDaoImpl;
import com.sy.service.SshnewsService;
import com.sy.util.Page;
import com.sy.vo.Sshnews;

public class SshnewsServiceImpl extends BaseServiceImpl implements SshnewsService {

	private PageDaoImpl Pdao;
	private SshnewsDaoImpl dao;
//添加新闻
	public void addNews(Sshnews sshnews) {
		dao.addNews(sshnews);
	}
//删除新闻
	public void delete(Serializable id) {
		dao.delete(id);
	}
//获得单条新闻
	public Sshnews getNews(Integer id) {
		return dao.getNews(id);
	}
//获得新闻列表
	@SuppressWarnings("unchecked")
	public List listNews() {
		return dao.listNews();
	}
//修改新闻
	public void updateNews(Sshnews sshnews) {
		dao.updateNews(sshnews);
	}
	public void setDao(SshnewsDaoImpl dao) {
		this.dao = dao;
	}
	public Page getPage() {
		return Pdao.getPage();
	}
	public void init(int pno) {
		String tableName="Sshnews";
		Pdao.init(pno,tableName);
	}
	public void setPdao(PageDaoImpl pdao) {
		Pdao = pdao;
	}
}